<?php get_header(); ?>
<div id="primary">

<?php if(get_option('T_slider') == "On") {?>
<?php get_template_part('slider'); ?>
<?php } ?>

<h2 class="sub">最新分享</h2>
<ul class="<?php if(get_option('T_masonry') == "On" || get_option('T_masonry') == "") {?>box<?php } else { ?>list<?php }?>">
<?php if (have_posts()) : while (have_posts()) : the_post();?>
<li class="article">
<div class="thumbnail"><?php if ( has_post_thumbnail() ) { ?><div class="img"><a href="<?php the_permalink(); ?>" title="<?php the_title() ?>"><?php the_post_thumbnail('thumbnail-list', array( 'alt' => trim(strip_tags( $post->post_title )), 'title'	=> trim(strip_tags( $post->post_title )), )); ?></a></div><?php } ?></div>
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title() ?>"><?php echo mb_strimwidth(get_the_title(),0,60,' …'); ?></a></h2>
<div class="cat"><?php the_category(' &middot; '); ?></div><p><?php echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 250, ' …'); ?></p>
<div class="info"><?php childtheme_post_header(); ?><?php the_time('Y.m.d'); ?> &middot; <?php comments_popup_link('发表评论', '1 条评论', '% 条评论'); ?></div>
</li>
<?php endwhile; ?>
</ul>
<div class="clear"></div>
<p><?php if (function_exists('pagenavi')): ?><div class="pagenavi"><?php pagenavi(); ?></div><?php else : ?><div class="pagenavi"><div class="left"><?php previous_posts_link('上一页'); ?></div><div class="right"><?php next_posts_link('下一页'); ?></div></div><?php endif; ?></p>
<?php endif; ?>
</div>

<?php get_sidebar(); ?>
<?php get_footer(); ?>